package com.mumulx.check.api.service;

import com.mumulx.check.redis.entity.PartTestBoxed;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "CHECKPART-PROVIDER-NXREMOTESERVER8001",fallbackFactory = RemoteServiceFeignFallbackFactory.class)
public interface RemoteFeignService {

    /*
     * 用于测试feign
     * @author mumulx
     * @creed: mumulx编写
     * @email: 2606964863@qq.com
     * @date 2020/10/31 22:52
     * @param id
     * @return int
     *
     */
    @GetMapping("/remoteserver/test/{id}")
    public int test(@PathVariable("id") int id) ;

    /*用于调用serverprovider  部件测试服务
     *
     * @author mumulx
     * @creed: mumulx编写
     * @email: 2606964863@qq.com
     * @date 2020/10/31 22:53
     * @param parts
     * @param rules
     * @param resultFilesDir
     * @return void
     */

    @RequestMapping("/remoteserver/executechecker")
    public int executechecker(@RequestParam("partTestBoxed") PartTestBoxed partTestBoxed) ;
}
